Instructions:
- This applet demonstrates the effect of two-dimensional filters on grayscale or color images.
- The output image is calculated in a 3-stage process:
(1) convolution of the input image with the filter kernel,
(2) multiplication with the scaling factor
(3) addition of the offset value
- The panel on the left has the following structure:
- The 5x5 square represents the filter kernel that is applied to every pixel in the image (image pixels within a 5x5 neighborhood are multiplied by the corresponding kernel values; the resulting 25 values are summed up, then sent as an output to the central image pixel).
- Use the applet as follows:
- load an image
- apply a pre-set filter kernel (the values appear in the kernel panel), or create your own filter by typing values into the respective kernel fields
- press Filter! to apply the kernel to every pixel of the image and to visualize the result.
- You may concatenate various filters, or apply one and the same filter again and again.
- The Normalize button sets the sum of all filter entries to 1.
- The Scale and Offset fields are used to optionally fit the filter output to a suitable range of values (e.g. to [0...255], the number of gray values that your monitor can display).
- Scale multiplies the result of the convolution by the indicated amount.
- Offset adds the indicated amount to the result of the convolution.
- Each filter is applied to the result of the previous filtering process; this permits application of a sequence of filters to the original image. To return to the original image, press the Reset button
- Try to detect edges in the image!
- Try to create a negative image!
Download Java Application (local execution allows you to load your own files)
- download Filter.jar (e.g. to your desktop)
- execution:
- Windows / Mac : double click on icon
- shell / dos: >>java -jar Filter.jar
- now you can load your own images (in gif or jpg format)
|
|