All times are UTC + 2 hours



Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Side by Side to anaglyph
PostPosted: 15 Jul 2010, 23:50 

Joined:
15 Jul 2010, 23:43
Posts: 18
Hello..I need a script for convert an original Side by Side Left/Right to anaglyph red and cyan
I know that with stereoscopic make this in realtime, but for example I want watch with kmplayer


 Profile  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 09:49 
Site Admin
User avatar

Joined:
29 Apr 2010, 17:51
Posts: 3148
Location: Sofia, Bulgaria
Here is the code you need for Side by Side to Anaglyph:

Code:
video2d = DirectshowSource("SBS-VIDEO.mp4")

video2d = ConvertToRGB32(video2d)

videoW = width(video2d)
videoH = height(video2d)

halfW = videoW / 2

f1 = Crop(video2d, 0, 0, halfW, videoH)
f2 = Crop(video2d, halfW, 0, halfW, videoH)

MergeRGB(f2.ShowRed, f1.ShowGreen, f1.ShowBlue)


 Profile WWW  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 10:14 

Joined:
15 Jul 2010, 23:43
Posts: 18
thanks!! in addition I want set proportion to 16:9

ad last, if movie in interlaced, i want deinterlace
thanks!!!!



edit: and if I want see with green and purple?


 Profile  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 10:17 

Joined:
13 May 2010, 17:15
Posts: 11
but to convert Above/Below video to anaglyph wich is the script


 Profile  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 11:05 
Site Admin
User avatar

Joined:
29 Apr 2010, 17:51
Posts: 3148
Location: Sofia, Bulgaria
To change the aspect ratio you need to resize the frame, deinterlacing needs additional plugins or you can deinterlace from the player and for green and purple I have no idea of the actual filters being used, so it is hard to help you there.

For Above/Below the script is pretty much the same, you just crop at half the height not the width of the frame.


 Profile WWW  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 15:31 

Joined:
13 May 2010, 17:15
Posts: 11
Bloody wrote:
For Above/Below the script is pretty much the same, you just crop at half the height not the width of the frame.

I've tried many settings but could not do anything right, I am a beginner in scripting


 Profile  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 15:37 

Joined:
15 Jul 2010, 23:43
Posts: 18
thanks..this because if Have this side by side L/R 3d movie
http://img6.imageshack.us/img6/91/immaginejnc.png

with your filter became:
http://img36.imageshack.us/img36/7268/immagine2ndk.png
(960x1080)

I want that have this result (the same that get stereoscopic in realtime on which use red and cyan output and 16:9)
http://img717.imageshack.us/img717/6403/immagine3qn.png

So what is the avisinth code to trasform in 16:9 to get double witdh (1920x1080) and get that result?
thanks


 Profile  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 16:30 
Site Admin
User avatar

Joined:
29 Apr 2010, 17:51
Posts: 3148
Location: Sofia, Bulgaria
In order to resize the 1080p squashed to full 1080p, after the crop you need to add the following two lines:

f1 = Lanczos4Resize(f1, 1920, 1080)
f2 = Lanczos4Resize(f2, 1920, 1080)


 Profile WWW  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 16:36 
Site Admin
User avatar

Joined:
29 Apr 2010, 17:51
Posts: 3148
Location: Sofia, Bulgaria
Here is the code you need for Above/Below to Anaglyph:

Code:
video2d = DirectshowSource("SBS-VIDEO.mp4")

video2d = ConvertToRGB32(video2d)

videoW = width(video2d)
videoH = height(video2d)

halfH = videoH / 2

f1 = Crop(video2d, 0, 0, videoW, halfH)
f2 = Crop(video2d, 0, halfH, videoW, halfH)

MergeRGB(f2.ShowRed, f1.ShowGreen, f1.ShowBlue)


 Profile WWW  
 
 Post subject: Re: Side by Side to anaglyph
PostPosted: 16 Jul 2010, 16:47 

Joined:
13 May 2010, 17:15
Posts: 11
thanks


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 2 hours


Who is online

Registered users: Bing [Bot], Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: