Anaglypher plugin for AviSynth

Оригинал на русском: http://shura.luberetsky.ru/plaginy-dlya-avisynth/anaglypher/

Anaglypher is an AviSynth plugin for making anaglyphic video out of stereopairs. It realises custom linear color blending, making available conversion of video to color-сustomised anaglyph.

The plugin computes the resulting image as follows:

anaglypher

where (R, G, B) are red, green and blue components of the output, (Rl, Gl, Bl) and (Rr, Gr, Br) are color components of respectively left and right images, and Li,j and Ri,j are color transformation matrices.

Though it may seem strange, the usage of the plugin is very simple. It is called like this:

Anaglypher(clip Left, clip Right, \
	   float L11, float L12, float L13, \
	   float L21, float L22, float L23, \
	   float L31, float L32, float L33, \
	   float R11, float R12, float R13, \
	   float R21, float R22, float R23, \
	   float R31, float R32, float R33)

Both clips shoulb be RGB24 or RGB32, and must have the same width and height.

To make an anaglyph, you should use it like this:

- Red-cyan monochrome

Anaglypher(Left, Right, \
	   0.299, 0.587, 0.114, \
	       0,     0,     0, \
	       0,     0,     0, \
	       0,     0,     0, \
	   0.299, 0.587, 0.114, \
	   0.299, 0.587, 0.114)

- Red-cyan color

Anaglypher(Left, Right, \
	       1,     0,     0, \
	       0,     0,     0, \
	       0,     0,     0, \
	       0,     0,     0, \
	       0,     1,     0, \
	       0,     0,     1)

- Dubois anaglyph

Anaglypher(Left, Right, \
	    0.456,  0.500,  0.176, \
	   -0.040, -0.038, -0.016, \
	   -0.015, -0.021, -0.005, \
	   -0.043, -0.088, -0.002, \
	    0.378,  0.734, -0.018, \
	   -0.072, -0.013,  1.226)

The other examples are in readme file of the plugin.

Here is an example video:

http://shura.luberetsky.ru/anaglypher/Dubois.avi

You can download the plugin here:

http://shura.luberetsky.ru/anaglypher/Anaglypher.zip

The installation of the plugin is simple and standart – just copy the Anaglypher.dll in the Plugins directory of AviSynth.

Один комментарий

  1. crockysam пишет:

    Are you clipping the color values to 1 and to 0? because I’m getting artifacts in my image when using Dubois filter

Ответить

Или воспользуйтесь входом по OpenID: