Log in

View Full Version : No depth in SBS 3D to ColorCode 3D


MalickT
22nd January 2012, 16:43
Hi. Im using this script to convert SBS so Red-Cyan:

DirectShowSource("E:\POTC4_SBS.mkv")
ConvertToRGB()
left=Crop(0,0,width/2,-0)
right=Crop(width/2,0,width/2,-0)
r=ShowRed(left)
g=ShowGreen(right)
b=ShowBlue(right)
MergeRGB(r,g,b)

this scripts works great but now when I try to convert it to ColorCode (Amber-Blue) I do not get no depth.

SBS to ColorCode script:

DirectShowSource("E:\POTC4_SBS.mkv")
ConvertToRGB()
left=Crop(0,0,width/2,-0)
right=Crop(width/2,0,width/2,-0)
r=ShowRed(left)
g=ShowGreen(left)
b=ShowBlue(right)
MergeRGB(r,g,b)

I tested it on Avatar and the ColorCode works perfectly, however when I tested it on Pirates Of The Caribbean 4 the depth is not present. Especially in the part where Penelope Cruz swings the sword trough door where Depp is standing. (Allso seen in trailers). Its like the scripts works only on some movies. I cant figure it out. Maybe my script is wrong. Please help...

IanB
22nd January 2012, 23:24
Your mapping of only the Blue to the Right eye presents to little information to that eye to "see" the 3D effect.

You need a much more complicated mapping scheme to match the colour grading of the lens in your Amber-Blue 3D glasses. Specifically you need to include upper blue-green hues in the right image and remove them from the left.

Possibly two MaskHS()'s, 1 selecting amber and the other selecting blue can make suitable masks to select the hue ranges in the left and right images.

See http://en.wikipedia.org/wiki/Anaglyph_image about 2/3 of the way down and also http://en.wikipedia.org/wiki/ColorCode_3D

IanB
22nd January 2012, 23:45
Ahhah!One eye (left, amber filter) receives the cross-spectrum colour information and one eye (right, blue filter) sees a monochrome image designed to give the depth effect. The human brain ties both images together
Try this which includes a greyscale of the right image as the final blue channel.DirectShowSource("E:\POTC4_SBS.mkv")
right=Crop(width/2,0,width/2,-0)
Crop(0,0,width/2,-0)
ConvertToRGB()
# Levels(0, 1.0, 255, 0, 150) # balance left/right brightness of required.
r=ShowRed()
g=ShowGreen()
MergeRGB(r,g, right)It may be good enough to avoid all the tedious messing around with amber and blue masks.