Video Source for Universal Stereosco... Log Out | Topics | Search
Moderators | Register | Edit Profile

stereo3d.com webboard » General 3D Discussion » Video Source for Universal Stereoscopic Player « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

David Sykes

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 22, 2002 - 9:33 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Michal Husak's Universal Stereoscopic Player successfully displays above/below format videos using page-flipping and Revelator glasses on my system.
I have built a stereo macro rig that I now want to add a couple of Logitech QuickCam Pro 4000 webcams to. The cameras are obviously not gen-locked but presumably accurately scan at the same speed.

Q1. How do I combine the two 640x480 movies to produce the required above/below format ?

Q2. Do I need to generate a visual 'clapperboard' signal (e.g briefly flash an LED in the scene) to make synchronisation easier ?

David Sykes
Top of pagePrevious messageNext messageBottom of page Link to this message

John Billingham

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 22, 2002 - 11:08 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Hello, David,
Are you signed on at "3DTV" at Yahoo groups?
Check the files for using AVIsynth and VitualDub
to splice and re-arrange ANY video combo,
And read P.K.K on synching non-gen-locked cameras.
I'm curious about your "stereo-macro" rig, it seems if I had 2 webcams next to each other, that
WOULD be a "Stereo-macro-Rig" ?( or are you using
smoke and mirrors?)
Best Wishes,
Keep Us Informed!
John Billingham
Top of pagePrevious messageNext messageBottom of page Link to this message

David Sykes

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 22, 2002 - 11:38 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Hello John.
I have recently joined "3DTV" and am aware of your and P.K.K's contributions.
I had started to check the files but without guidance the task seemed daunting. Hopefully the keywords you have suggested will find the relevant entries.
Although I am not using smoke in my macro rig, I am using mirrors :-).
Basically, a horizontally-mounted American Optical (uncommon in UK) x6 zoom microscope has it's optical paths diverted to two side-by-side SLR cameras and also via beamsplitters to (at the moment) a pair of CCD cameras connected to a TV for monitoring purposes only.
By fitting two webcams instead I am hoping to make stereo movies of at least 640x480 viewed as previously mentioned.
Of course, if I could also monitor the image in stereo during the capture process (maybe at smaller resolution) then just as the Ladybird pounces on a Greenfly I can press the button and capture a stereo-pair of conventional high-resolution film images :-).
We know this can be done now, just need a little guidance.

David Sykes
Wales, UK
Top of pagePrevious messageNext messageBottom of page Link to this message

Puppet Kite Kid

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 23, 2002 - 4:47 am:   Edit PostDelete PostView Post/Check IPPrint Post

The biggest challenge is to capture from both webcams at the same time. Using two separate computers might actually be the easiest and the cheapest way... (unless you've got a better idea ;-)

It's simple to create A/B (above/below) from two separate (pre-recorded) video sources using an AviSynth script. (Since I'm not an AviSynth expert, I do all I can with VirtualDub, whenever possible :-)
Put the two captures together with a script like this:

# LEFT Field **** #

DirectShowSource("LEFT.avi",fps=30) # "Filename"

LEFT=Crop(0,0,704,240) # Crop to Uniform size (left,top,width,height)


# RIGHT Field **** #

DirectShowSource("RIGHT.avi",fps=30) # "Filename"

RIGHT=Crop(0,0,704,240) # Crop to Uniform size (left,top,width,height)


# **** Stack Vertical **** #

StackVertical(Left,Right)


If you already have the source in interlaced or side-by-side format, there is a great VirtualDub filter called "ViewFields" that converts to A/B here:
http://www.geocities.com/siwalters_uk/viewfields.html
If you are starting with a side-by-side video, first use the internal "Deinterlace" filter and "Fold Side-By-Side Fields Together", then use the "ViewFields" filter.

I make all my 3D videos with two separate captures from two non-genlocked camcorders. My original captures are on Hi-8 film, then I capture through a video card to 704 x 240 AVI's with the HuffyUV codec at 29.97 fps. Using VirtualDub, I can open each video (temporarily resized to 320 x 240) in separate VirtualDub windows (applications) and free-view them in 3D on my desktop and sync them to a *common* frame, then save each edit to a new file. (Most of my videos have been short sequences... if you wanted to eliminate a step or two, you'd have to use some AviSynth scripts to trim each source and combine them to the format you want... even an A/B conversion is possible.) Since my original capture to AVI is 29.97 fps, in theory, that is the _worst_ possible sync I can get, but most are probably better than that by chance. I only have problems when the subject matter moves very rapidly, and even then that sometimes produces a *natural* look to the video, not nearly as disastrous as you might guess.
Most of the genlocked cameras, as far as I have understood, produce a field sequential video where each field contains the information from each camera. These too, would not be exactly in perfect sync, but are close enough to not cause any retinal rivalry or discomfort. I think these are usually captured at double-frame-rates, so the sync would be better than what I usually get. Also, this field sequential recording is usually captured to tape or digital file in real time, not as two separate sources. I am not familiar with the technical aspects of this and how it is actually done, as far as hardware requirements go... (and my soldering sucks ;-)
If you can figure out how to genlock two webcams without using additional expensive hardware, many people would like to hear about how you did it! (Me, included.) There are ways to open two separate cams in two separate webcam software programs, but to capture video from both would be a challenge... although the faster computers available today might be getting close to this ability.

P. K. Kid
3D Adventures Of The Puppet Kite Kid:
(All G-Rated) http://www.PuppetKites.net
Top of pagePrevious messageNext messageBottom of page Link to this message

M.H.

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, October 23, 2002 - 10:24 am:   Edit PostDelete PostView Post/Check IPPrint Post

Q1: Answer - have a look on following WWW how to do this work in Adobe Premiere:

http://mysak.umbr.cas.cz/~husakm/Public/main/stereopcvideo.html

Pupet Kit Webacam camera opinion:
Study C++
Study Microsoft Direct Show SDK
Search for Direct Show filters contained
in Intel Image Processing Library ...

You will find an order of magnitude more elegant soultion :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

John Billingham

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, October 24, 2002 - 1:27 am:   Edit PostDelete PostView Post/Check IPPrint Post

Michal Husak writes:
"Pupet Kit Webacam camera opinion:
Study C++
Study Microsoft Direct Show SDK
Search for Direct Show filters contained
in Intel Image Processing Library ...

You will find an order of magnitude more elegant soultion :-) "

Michal, you forgot the FIRST step neccessary
for many of us... "Get a new Brain"!
Best Wishes,
John Billingham
Top of pagePrevious messageNext messageBottom of page Link to this message

David Sykes

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, October 24, 2002 - 5:40 pm:   Edit PostDelete PostView Post/Check IPPrint Post

> Michal Husak writes:
>"Pupet Kit Webacam camera opinion:
>Study C++

OK, I will

> Study Microsoft Direct Show SDK

OK !

> Search for Direct Show filters contained
> in Intel Image Processing Library ...

OK !

> You will find an order of magnitude more
> elegant soultion :-) "

Ahhh ... I suspect the 'details' will be difficult,take a year of work and require commercial backing :-)

> Q1: Answer - have a look on following WWW how >to do this work in Adobe Premiere:

>http://mysak.umbr.cas.cz/~husakm/Public/main/stereopcvideo.html

Michal, I have downloaded this but cannot test it as I do not yet have a source of two video sequences.

If anyone has suitable material it would be GREATLY appreciated as I could try Michal's scripts and also the methods suggested by P.K.K.
Otherwise, it is all rather academic :-).
(Filesize not a problem as long as no more than 32Mb. British Telecom cut the link after two hours).

P.K.K.
I will continue the hardware discussion in 3DTV Group.
However, where does this strange framerate of 29.97 fps come from and why the 704 x 240 size?
Is the A/B format therefore 704 x 480 ?
What is HuffyUV codec and why is it used ?
There does seem to be a lot of codecs around !

Regards,

David Sykes
Wales, UK
Top of pagePrevious messageNext messageBottom of page Link to this message

Puppet Kite Kid

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, October 25, 2002 - 12:24 am:   Edit PostDelete PostView Post/Check IPPrint Post

Feel free to download any version of 3D video from my website and play around with the conversions. Familiarizing yourself with converting from one format to another will get you on the right track. Be prepared... if you ever get a 3D video of your own made, you are going to get requests for _all_ of the formats :-)
To create a separate left and right pair to play with, download a parallel video, crop off the left half and save it as "right.avi" and crop off the right half and save it as "left.avi"... VirtualDub can open MPEG 1's, and you can save them as AVI's using any installed codec... or convert them to MPEG's with a program like TMPGEnc freeware. This isn't the best way for quality, but it _will_ give you something to play with :-)

29.97 fps is what we people near Seattle, Washington, USA use to make our MPEG's, especially if we want to make "compliant" VCD's that will play in a DVD player. Folks in Wales, UK probably use 25 fps. Strange, too, as I think your water goes down the drain the same way as ours ;-) BTW, half that frame rate works good for internet videos to keep the file size small...
704 x 240 is what my ASUS (Nvidia) graphics card captures at with the maximum width setting and half-height. i.e., *squeezed* height or only even or odd lines. This is also the maximum resolution possible for me without dropping frames, using the HuffyUV codec... and that answers another one of your questions... that is precisely what the HuffyUV is used for. If I capture at 704 (and I'm not sure where the "704" figure came from, and would like to know, myself...) x 480, I get lots of dropped frames, even with the HuffyUV, and I get interlacing that happens *naturally* when capturing video. Interlacing is hard to get rid of, but because of dropped frames, I've never experimented with deinterlacing two 2D sources for 3D use. Dropped frames are never the exact same frames in both videos of a pair (although the average number of them might be the same) and this causes all sorts of problems with 3D video, as you can imagine.
Other than the free HuffyUV codec, some people use MJPEG for capture... I never have, but probably should try it, too. The capture codec that came with my ASUS card works good, also, and makes smaller file sizes than the HuffyUV, but not as good of quality. HuffyUV files are still quite large, but because of the ability to capture with no dropped frames, it is a good one. Most other codecs are not good for editing and archiving. Most of them are lossy and create compression artifacts, and the HuffyUV is a lossless codec (I think)... or it acts like one, for sure ;-)
Feel free to correct me if I'm wrong...
I'll be studying C++ for the next ten years, so please be patient ;-)


P. K. Kid
3D Adventures Of The Puppet Kite Kid:
(All G-Rated) http://www.PuppetKites.net
Top of pagePrevious messageNext messageBottom of page Link to this message

M.H.

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, October 25, 2002 - 3:07 pm:   Edit PostDelete PostView Post/Check IPPrint Post

David:

One more glue:
Study Direct Show program caled
GraphEdit (graphedt.exe). You can manualy combine together several DirectShow component simlpy by
moving them and connecting them together ...
You can ege put in 2 camera sources (if you have them connected) ,
connect them with some filter combining the signals + conect with output on the screen or output into avi file ...
Example of a filter combining 2 sources togeter is a part of the freally availabe Intel image processing Liberary (VEL Stretch filter) ...

I cannot unfortunately give you my Brain :-(
but for anybody with some basic C++ expereinces
(or even without them, GraphEdit is a self-explanatory tool) can catch it ...
Top of pagePrevious messageNext messageBottom of page Link to this message

David Sykes

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, October 25, 2002 - 6:31 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Ahhh ... I am aware of GraphEdit but could not remember it's name.
That is a good idea, I will study it and the VEL Stretch filter.

Take care of your brain :-).

David
Top of pagePrevious messageNext messageBottom of page Link to this message

David Sykes

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, October 25, 2002 - 7:46 pm:   Edit PostDelete PostView Post/Check IPPrint Post

Michal,
I forgot to ask :-
What video resolution and framerate with USB 1 ?
What video resolution and framerate with USB 2 ?

What speed computer and any particular operating system ?
Top of pagePrevious messageNext messageBottom of page Link to this message

M.H.

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, October 26, 2002 - 5:18 pm:   Edit PostDelete PostView Post/Check IPPrint Post

David:

I had only USB 1 camera availabe for
testing. The resolution and framerate was identical with the maximum of single camera ...

For 2 DV cemra I did not optimizie the proces but I was getting full PAL resolution at about 10 fps on P IV 2 GHz.

I expect that for USB 2 cameras the result will be similar to the DV cameras ...

W2K system used ...

According perfomance - in both cases a DV compresed storage or on the fly conversion to OpenGl filipped stereo output was a part of the process ...

I thing that a mixing filter doing simply nothing else than image mixing can give full 25 fps on such sytem with double PAL resolution output ...

I thing about encoding a Intel procesing lib. independent mixing filter, it is a work for 2-3 days. Unfortunately I work on comercial project related to this problematic (DepthQ) and I must ask my boss whatever I can make the eventual result public ...
Top of pagePrevious messageNext messageBottom of page Link to this message

Doug 3D

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 12, 2003 - 6:11 am:   Edit PostDelete PostView Post/Check IPPrint Post

My company has done just what was asked about. 2 video sources are muxed into a single frame with configurable output r over l, r over l half height, r/l side by side, etc. We also take a Nuview interlaced input, split it, and convert it to other formats on the fly.

http://www.realtime-3d.com

No b.s. here. DirectShow was a real btch. Things are documented, but you have to be a b@lls out Windows developer to get through some of the issues.

As stated above, one of the biggest issues is synchronization. Another issue is bandwidth. Believe it or not, once you figure it out, CPU is not that important.

We can capture full motion video compressing it on the fly. The frame rate depends on CPU availability which depends on video bandwidth and compression speed.

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | User List | Help/Instructions | Program Credits Administration