Author V. C. Mohan
Last modified Date Aug 2014

This plugin has two functions viz TRSeamer and WSSeamer. and utilise different methods to identify the seams.

Of late seam carving tecnique is in news as an image resizing method that will carve out lines from image which are least interesting, thereby keeping interesting parts of image mostly unaffected. The method involves some manipulations and sometimes supervision.

Shai Avidan and Ariel Shamir in their paper titled 'Seam Carving for content aware Image Resizing' illustrate results of 5 different strategies for reducing the width of an image. (a) best cropping, (b) removing columns with minimal energy, (c) seam removal, (d) removal of the pixel with the least amount of energy in each row, and finally, (e) global removal of pixels with the lowest energy, regardless of their position. RSeamer and WSeamer functions included in the earlier version of this plugin corresponds to probably (d), while the present functions correspond to (c).

Seam carving prima faci is unsuitable for moving images of a video due to 1. Position of seams are likely to change from frame to frame due to movement of subjects, changes in lighting etc.; and produce unacceptable jitter within images.2.Very slow and 3. It will be beyond reasonable effort to supervise the seam carving.

This plugin may not be of much use to any serious video processing.

The functions have minimal input parameters.They are identical for both. X and Y are the desired dimensions of the frame. Both reduction as well as enlargement are possible independantly for width and height. However the desired dimension should not be less than 32 pixels or more than twice input frame dimensions.

Both the width 'x' and height 'y' of output should not be same as that of input frame. Seam removal or insertion can be alternated between width and height dimensions. Also seam can be defined either as peak or trough.

Input clip RGB format only and preferably be field based.
Details of parameters
Description Name Type Limits Default
Input clip clip preferably have the fields separated none
Desired width of output frame x integer between 32 and twice original width input frame width - 10
Desired height of output frame y integer between 32 and twice original height input frame height - 10
whether to use highs or lows as seam carving peak Boolean true for peak, false for low false
whether seams are to be affected alternately along width and height alt Boolean true for alternate, false for first width then height false

#Usage examples:-
imagereader("E:\images\canyon.jpg", end = 20).converttoRGB32()
im1 = reduceby2()
trm1 = trseamer(im1,x = 712,y = 584)
trm2 = trseamer(im1,x = 312,y = 184)
trm3 = trseamer(im1,x = 712,y = 184)
ws3 = wsseamer(im1,x = 712,y = 184, peak = true)

input image 1 512 X 384 pixels

display of trm1 showing enlargement to 712 X 584

display of trm2 showing reduction to 312 X 184
display of trm3 and ws3 vertically stacked with resizing to 712 X 184 by both functions
To my index page down load plugin To Avisynth