When working on videos (stacks in ImageJ), it is always interesting to make transitions between video clips to finalize a small movie .... and that's possible with ImageJ.
1- Fade-in / Fade-out
Fade-in and fade-out are two basic video effects consisting of a smooth transition from or to a black image, respectively.Fade-in: from a black image, the image is progressively appearing.In terms of image processing, this transition is done by linearly interpolating your image with a black one and that's really easy to do with ImageJ...
Fade-out: The image is slowly disappearing leading to a black image. This is often used at the end of a movie.
Fig.1: RGB image of 320x180 (16/9 ratio) |
- Download this image and open it in ImageJ
- Check that this image is of RGB type.
- Add a black slice (Image > Stacks > Add Slice)
- Then, the fade-out effect is done by interpolating the title image with the black slice thanks to the function Scale (Image > Scale...).
- Check that the interpolation scheme is Bilinear and enter in Depth (Images) text field, the number of frames you need for the transition. I choose 40 frames.
- Et VoilĂ !
+++ IJ snippet +++ +++ End of IJ snippet +++
To get the fade-in effect, reverse the stack with Image > Stacks > Tools > Reverse function.
2- Dissolve (or cross-fade) effect
Using the same principle, the dissolve effect is a transition calculated between two images. Here is an example...Fig.2: RGB montage to compute the dissolve effect between these two images. The image #2 is a scaled and cropped version of the Embryos image available in the Samples directory. |
Fig.3: function Montage to Stack... to convert the Fig. 2 into a stack. |
Hope that helps!
No comments:
Post a Comment