Video Editing

Author: Benjamin Schmid(Bene.Schmid at gmail.com)
History: 2009/04/22: First public version
Limitation:
Installation: Download Video_Editing.jar to the plugins folder, or subfolder, restart ImageJ, and there will be a new subfolder in the plugins menu, called 'Video Editing'.
Description:


Concepts

The core of this plugin is a writable virtual stack, which allows to load large stacks and edit them. All the plugins provided in this package use this writable virtual stack for special video editing tasks.

The writable virtual stack stores the individual frames in an own folder. The filename of the individual frames have the form .tif. Another file in the same directory, called 'indices', stores the order of the frames in a list of numbers.

When a new frame is added, the highest appearing number is increased by one and used for the file name.

New Video

The 'New Video' plugin creates a new writable virtual stack. To store the frames of the stack, it needs a new, empty directory. Additionally, it asks the user for the desired width and height of the video to be created.

An image is created from the stack, having one frame added, and is displayed. When the image is closed, the 'indices' file (see above) is created and stored together with the frames.

Open Video

The 'Open Video' plugins creates a writable virtual stack from the frames in the specified folder. The folder also has to contain the 'indices' file (see above).

Like 'New Video', an image is then created from the stack and displayed. Changes in the frames are saved to file as soon as another frame is displayed. The 'indices' file is updated and written to file when the image is closed.

Adding, duplicating and deleting frames

The plugin 'Add Empty Frame' adds empty (black) frames to the stack. The user is asked, after which slice the frames should be added, and how many.

The plugin 'Duplicate Frame' duplicates one frame one or several times. The user is asked which frame to duplicate, and how often.

The plugin 'Delete Frame' deletes one or several frames. The user is asked which frame is the first one to delete, and how many there are to be deleted.

Inserting another image stack

The plugin 'Insert Stack' inserts another stack into the video stack. The user has to choose an open stack, as well as the slice in the video stack after which the stack should be inserted.

Transitions between frames

The plugin 'Make Transition' creates a user-specified amount of slices between 2 frames, to make a smooth transition between them.

Currently, fading, horizontal stripes and vertical stripes are implemented.

The user specifies the slice from which the transition is made to the consecutive slice, the numbers of frames added for the transition, and the type of transition:

Here the 2 original frames:

After making the transition:



Animated Drawing

The plugin 'Draw Roi' allows to draw the outline of a ROI, distributed to several consecutive slices.

The user has to provide a ROI. Additionally, the following parameters have to be given:

  • Slice: The starting slice
  • Pixels per slice: The number of pixels by which the ROI is moved per slice. A number lower than 1 means that the whole movement is done within one frame.

Here the starting frame:

And here some of the produced frames:

As color for the drawn line, the foreground color of ImageJ is used. The width can be changed by changing ImageJ's line width.



Moving ROIs

The plugin 'Move Roi' allows to move a selection within consecutive frames.

The user has to provide a ROI. Additionally, the following parameters have to be given:

  • Slice: The starting slice
  • Pixels per slice: The number of pixels by which the ROI is moved per slice. A number lower than 1 means that the whole movement is done within one frame.
  • Mode: Either 'Copy' or 'Cur'
  • dx: The amount of pixels the ROI should be moved in x direction.
  • dy: The amount of pixels the ROI should be moved in y direction.

Here the starting frame:

And here some of the produced frames:



That's what it looks like



| Back |