Monday, November 19, 2012

Extracting 3d images from 2d (or simple) video.

These images cant be extracted from any part of the video.

You have to search for parts in which the camera is moved from left to right on static (not moving) objects.

If you've found such a scene, note the time from which it starts.

Now you've to extract frames starting from this part of the video, do this using mplayer (for e.g.) -- 

mplayer -vo jpeg -frames 200 -ss 00:00:33 '/home/de/media_writeit!/media/test media/html5_Video_VP8.webm'

In the above e.g. frames are extracted from the 33rd second, and 200 frames are extracted from this time. How many frames to extract depends on the FPS of the video and/or how fast the camera moves.

This command will populate the directory you're in with 200 jpg images.

An idea of exactly how many frames are required and the next steps to make the image can be read in my previous post "Creating 3d anaglyph images".

A sample created from RE trailer -- 


Creating 3d anaglyph images.

As you know, for a 3d picture, you have to take 2 images both of which will represent the views of both your eyes. But that doesn't mean you take 1 image via the viewfinder of your left eye, and the other via the viewfinder of your right eye. The result will have too much difference in them.
Instead take multiple pictures, starting from the left eye point of view (the 'master' or first picture from which a 3d picture will be made), and then slowly moving the camera towards the right taking successive snapshots. Notice the motion should be very slow. The slower the motion and the more number of snapshots in between, better are the chances of you getting the perfect picture.

Now you have to assemble the picture using a program called 'plascolin', you may also use gimp for the purpose.

Open the left image first in plascolin, then it's automatically going to open the next image in the same folder in alphabetic order and combine them so as to form the 3d image.

Now for the perfect picture.

You've taken multiple images, if the difference between the selected left and right image is too much, viewing the picture will be a headache, if it's too less, the 3d effect wont be much. Ideally, ½ inch difference between the left and right images will be the best, but still it's not guaranteed to be the best; from here our quest begins for the perfect 3d image.

So in the list of images, first make multiple folders; in these folders you'll pair 2 images, the first one being the left most image in all cases; i.e. in all these folders, there will be a symlink (or copy) to the first image.
Now you have to select the second image, start off by symlinking the rightmost image to the first folder. Make a 3d image off these 2 images, if you find that you're getting headaches (if you're not, you've found the perfect picture), move the 4th or 5th rightmost image to the second folder, check the results, if you find there're no headaches, move the 3rd or 4th rightmost image to another folder, but if you do have headaches with the 4th or 5th image also, proceed to the 7th or 8th image. Preview both to see what's best and continue doing the same until you find your perfect image.

I hope you understand what I mean. You've to find the image which 'just' wont give you the headaches, that'll give you the best 3d effect.

Now for a sample --

This's my 13 year old dog. Notice the hair, they really look nice.

Thursday, November 15, 2012

Philips SHP2000 review.

These 32 Ohms headphones are cheep yet, it's quality is fabulous.

If you ain't deaf (i.e. wont hear so load so as to damage your ears), these head phones are pretty good! A very good replacement for in ear earphones.

The base, mids and highs are all good, and you won't have to do much with the equalizer to get that solid base.

It looks good too, but 1 drawback -- cause of high impedance, it's not designed to be used without an amplifier. i.e. it wont be working with the inbuild sound card of your laptop/desktop; with a good dedicated sound card, it may work. All this cause these can handle 500mW of power.

Also note -- the noise isolation is not good.

It's comfortable to wear, but gets a bit hot on prolonged usage.