Changes between Initial Version and Version 1 of RemapFilter


Ignore:
Timestamp:
Apr 6, 2016, 12:41:52 AM (3 years ago)
Author:
fsluiter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemapFilter

    v1 v1  
     1This filter copies pixel by pixel a source frame to a target frame.
     2It remaps the pixels to a new x,y destination based on two files ymap/xmap.
     3Map files are passed as a parameter and are in PGM format (P2 or P5),
     4where the values are y(rows)/x(cols) coordinates of the source_frame.
     5The *target* frame dimension is based on mapfile dimensions: specified in the
     6header of the mapfile and reflected in the number of datavalues.
     7Dimensions of ymap and xmap must be equal. Datavalues must be positive or zero.
     8Any datavalue in the ymap or xmap which value is higher
     9then the *source* frame height or width is silently ignored, leaving a
     10blank/chromakey pixel. This can safely be used as a feature to create overlays.
     11
     12Algorithm digest:
     13Target_frame[y][x] = Source_frame[ ymap[y][x] ][ [xmap[y][x] ];
     14
     15Example command:
     16ffmpeg  -i fisheye_grid_input.jpg -i fisheye_grid_xmap.pgm -i fisheye_grid_ymap.pgm -lavfi remap out.png