I got a request from a Planetarium to develop a avisynth plugin with a specific function. I understand that usually not just stars and planets but specially produced videos can also projected on the dome thereby giving the viewers a fully immersive experience. The input usually is a fish eye view (converted) video in a square frame. The output is projected on to a spherical mirror. A mapping file specific for the output frame size is given
This Planetarium plugin reads the input mapping data file in which the first line has a single value that specifies the input image type. This value is 2 for fish eye view input. The second line has 2 values the number of values along row and height this data file following lines specifies.The following each of lines have in normalised floating file format the x and y values of output frame the w and h values of input frame and intensity. The output frame coordinates are normalised with frame center as 0, 0 while the input file has left bottom as origin. Using this file this plugin performs thousands of matrix conversions and keeps this in a look up table. Since these conversions are done by cpu at present, the start up is slow. In future using Graphic cards capabilities will be explored to speed up.
The output is a frame of the size that is to be specified and for which the mapping data file was specially made. Planar (Yv12 only In the avisynth 2.5 version), RGB, YUY2 formats are supported. The mapping input text file and
The input parameters are the input clip, mapping data file, output frame size type of input data type of interpolation. The plugin has no way to check whether the input is of type indicated in the data file. It is the users responsibility to ensure this. The output may exhibit strong striations due to abrupt variations of intensity. To eliminate this parameter 'level' can be used. A level of 7 may be quite satisfactory.
Parameter | Parameter name | Variable type | Limits of values | Default value |
Input clip | clip | none | ||
Mapping data file | string | none | ||
Output frame height | oh | integer | 720 to 4096 arbitrary | 1920 |
Output frame width | ow | integer | 480 to 4096 arbitrary | 1080 |
Type of input to check with data file) | type | integer | none | 2 |
type of interpolation | level | integer | number 1 to 4 | 1 |
loadPlugin ("D:\...........\Planetarium.dll") imagesource("D:\Hari_Nandakumar\mercury55.jpg", end = 300) #image is enlarged 2X2 to mimic GPU accuracy lanczosresize(2048,2048) planetarium("D:\........16x9example.data", level = 1)input frame :
To my index page |
To Avisynth |